<?php

namespace common\models;

use common\components\TimestampTrait;
use Yii;

/**
 * This is the model class for table "{{%receive}}".
 *
 * @property int $receive_id
 * @property string $name 姓名
 * @property string $mobile 手机号
 * @property string $money 领取金额
 * @property string $security_sn 防伪码
 * @property string $identity_code 身份码
 * @property int $created_at 领取时间
 */
class Receive extends \yii\db\ActiveRecord
{
    use TimestampTrait;
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%receive}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['money'], 'number'],
            [['security_sn', 'identity_code'], 'required'],
            [['created_at'], 'integer'],
            [['name', 'mobile', 'security_sn', 'identity_code'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'receive_id' => '序号',
            'name' => '姓名',
            'mobile' => '手机号',
            'money' => '金额',
            'security_sn' => '安全码',
            'identity_code' => '身份码',
            'created_at' => '领取时间',
        ];
    }
}
